1. Field of the Invention
The present invention relates to a process of modifying packets in a network environment and more particularly to an engine that allows for many types of modifications to be made to many different types of packets.
2. Description of the Related Art
A network may include one or more network devices, such as Ethernet switches, each of which includes several modules that are used to process information that is transmitted through the device. The process of handling the data packets begins with the initial receipt of the packets. The portions of the packets are examined and the packets are temporarily stored in memory until a forwarding decision is made with respect to a specific packet. The forwarding decision can include determining an egress port of the network device to allow the packet to proceed to its ultimate destination, forwarding the packet to an external processor for further processing and dropping the packet, in certain circumstances. Part of the process of forwarding a packet can also include modifying a packet.
In many circumstances, the modification of the packet is essential. One such case occurs when the packet is encapsulated, such as tunnel encapsulation. Encapsulation, generally, is the inclusion of one data structure within another structure so that the first data structure is hidden for the time being. Packets are encapsulated to comply with specific formats, where that encapsulation can be removed or altered by the network device. The process of packet modification is key to the ability of a network device to handle packets.
However, many of these prior art network devices cannot provide fast handling of network data that also allows for flexibility of packet modification. In order to provide line-rate handling of data packets, specific types of packets are expected, so that the positions of fields of interest in the packet are generally known and expected to occur at specific positions within the packet structure. Since much of this handling is incorporated into the hardware for speed reasons, the prior art network devices are less flexible and often require external handling of packets that do not fit specific criteria. In addition, if a new packet format is proffered, the prior art network devices will not be able to handle the new format through existing processing hardware.